package com.baizhi.service.impl;

import com.baizhi.entity.Section;
import com.baizhi.mapper.SectionMapper;
import com.baizhi.service.SectionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SectionServiceImpl implements SectionService {
   @Autowired
   private SectionMapper sectionMapper;

    @Override
    public void insertSection(Section section) {
        sectionMapper.insertSection(section);
    }

    @Override
    public void deleteById(Integer id) {
        sectionMapper.deleteById(id);

    }

    @Override
    public void deleteAnySection(List<Integer> ids) {
        sectionMapper.deleteAnySection(ids);
    }

    @Override
    public void updateSection(Section section) {
        sectionMapper.updateSection(section);
    }

    @Override
    public List<Section> selectSection(Integer pageNum, Integer pageSize, String search) {
        return sectionMapper.selectSection(pageNum,pageSize,search);
    }

    @Override
    public int totalRows(String search) {
            return sectionMapper.countRows(search);
    }
}
